package com.hr.classes.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * <pre>
 * 描述：TODO
 * </pre>
 *
 * @类名：com.hr.classes.entity.TbWorkRecord
 * @创建日期: 2024/5/7 20:49
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("tb_work_record")
@ApiModel(value = "TbWorkRecord对象", description="")
public class TbWorkRecord extends Model {

    private static final long serialVersionUID = 1L;

    /**
     * 考勤记录id
     */
    @ApiModelProperty(value="考勤记录id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户id
     */
    @ApiModelProperty(value="用户id")
    @TableField("user_id")
    private Integer userId;

    /**
     * 打卡日期
     */
    @ApiModelProperty(value="打卡日期")
    @TableField("date")
    private Date date;

    /**
     * 上班打卡记录
     */
    @ApiModelProperty(value="上班打卡记录")
    @TableField("work_up_record")
    private Date workUpRecord;

    /**
     * 下班打卡记录
     */
    @ApiModelProperty(value="下班打卡记录")
    @TableField("work_down_record")
    private Date workDownRecord;

    /**
     * 工作时长（小时）
     */
    @ApiModelProperty(value="工作时长（小时）")
    @TableField("work_time")
    private BigDecimal workTime;

    /**
     * 所属单位
     */
    @ApiModelProperty(value="所属单位")
    @TableField("affiliated_unit")
    private String affiliatedUnit;

    /**
     * 是否正常异常
     */
    @ApiModelProperty(value="是否正常异常")
    @TableField("normal")
    private String normal;
    @ApiModelProperty(value="0 未打卡  1 上班已打卡 2上下班均已打卡 ")
    @TableField("clock_tag")
    private Integer clockTag;

    @TableField("clock_time")
    private LocalDateTime clockTime;
}